package cn.test.processor;

import org.springframework.beans.factory.FactoryBean;

/**
 * @auther hanchao
 * @date 2016/12/21 23:46
 */
public class FactoryBeanclass implements FactoryBean{
    private Class<?> targetClass;
    private Object target;

    @Override
    public Object getObject() throws Exception {
        return target;
    }

    @Override
    public Class<?> getObjectType() {
        return targetClass;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }

    public Class<?> getTargetClass() {
        return targetClass;
    }

    public FactoryBeanclass setTargetClass(Class<?> targetClass) {
        this.targetClass = targetClass;
        return this;
    }

    public Object getTarget() {
        return target;
    }

    public FactoryBeanclass setTarget(Object target) {
        this.target = target;
        return this;
    }
}
